﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace BaseTypesLib.Model
{
    [DataContract(IsReference=true)]
    public class SeparatorField:Field
    {
        [DataMember]
        private bool isHorizontal;
        public SeparatorField()
        {
            PropertyChanged += SeparatorField_PropertyChanged;
            
        }

        void SeparatorField_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "Manager")
            {
                OnPropertyChanged("IsHorizontal");
            }
        }
        [Browsable(false)]
        public bool IsHorizontal
        {
            get
            {
                if (Manager is Screen || Manager is VerticalFieldManager)
                    isHorizontal = true;
                else
                    isHorizontal = false;
                return isHorizontal;
            }
        }
    }
}
